<html>
<head>
    <title>添加手续费</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/layui//css/layui.css">
    <script src="/static/layui/layui.all.js"></script>
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/dealParam.js"></script>

</head>
<body>
<form class="layui-form" action="/back/dealParam/fee/insert" method="post" style="width:80%;">
    <#--选择交易货币、设置交易场景、交易金额条件、对应手续费比例-->

        <div class="layui-form-item">
            <label class="layui-form-label">交易货币</label>
            <div class="layui-input-block">
                <select id="coinTypeSelect" name="coinTypeId">


                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">交易场景</label>
            <div class="layui-input-block">
                <select id="dealSceneSelect" name="dealScene">
                </select>
            </div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">交易金额条件</label>
        <div class="layui-input-block">

            <input type="text" class="layui-input" name="baseDealCount" placeholder="请输入交易金额条件">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">对应手续费比例</label>
        <div class="layui-input-block">

            <input type="text" class="layui-input" name="feeRatio" placeholder="请输入手续费比例">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="*" lay-filter="addQuartzTask">立即提交</button>
            <#--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
        </div>
    </div>
</form>
<script>
    var coinTypeList = getCoinTypeList();
    var coinTypeOptionList = '';

    $.each(coinTypeList,function (index, coinType) {
        coinTypeOptionList += '<option value="'+coinType.id+'">'+coinType.name+'</option>';
    });
    var coinTypeSelect = $("#coinTypeSelect");
    coinTypeSelect.append($(coinTypeOptionList));

    var dealSceneList = getDealSceneList();
    var dealSceneOptionList = '';

    $.each(dealSceneList,function (index, dealScene) {
        dealSceneOptionList += '<option value="'+index+'">'+dealScene+'</option>';
    });
    var dealSceneSelect = $("#dealSceneSelect");
    dealSceneSelect.append($(dealSceneOptionList));
    layui.use('form', function(){
        var form = layui.form;
        form.render('select'); //刷新select选择框渲染
        //监听提交
        form.on('submit(*)', function(data){
            window.location.href='http://localhost:8080/back/dealParam/fee/listpage';
        });
    });
</script>
</body>
</html>